package main

import "fmt"

func main() {
	defer f2()
	f1()
}

func f1() {
	panic("panic")
}

func f2() {
	if err := recover(); err != nil {
		fmt.Println("panic occurred!")
	}
}
